import Vue from 'vue';
import VueResource from 'vue-resource';
import * as data from './mock-data';

const TIMEDATA = 500;
Vue.use(VueResource)
export function vaildLogin() {
    return new Promise(res => {
        setTimeout(() => {
            res('ok')
        }, TIMEDATA);
    })
}
export function getBtcData() {
    return new Promise(res => {
        setTimeout(() => {
            res(data.btc.ticker)
        }, TIMEDATA);
    })
}
export function getLtcData() {
    return new Promise(res => {
        setTimeout(() => {
            res(data.ltc.ticker)
        }, TIMEDATA);
    })
}
export function getEthData() {
    return new Promise(res => {
        setTimeout(() => {
            res(data.eth.ticker)
        }, TIMEDATA);
    })
}